using namespace std;
#include "node.h"
#include "regex.h"
#include <iostream>
#include <queue>

class Parser {
	private:
		Regex *regex;
		Node *Concat();
		Node *Union();
		Node *Star();
		Node *Group();
		Node *Character();
		Node *Expression();
		bool error;
		char prevToken;
	public:
		Parser(Regex *regex);
		Node *Parse();
		bool bracketsMatch();
		void print(Node *root);
		bool inAlphabet(char character);
};
